package com.spyx.product.mapper;

import com.atyx.spyx.model.product.SkuInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import feign.Param;

/**
 * <p>
 * sku信息 Mapper 接口
 * </p>
 *
 * @author yhp
 * @since 2024-05-15
 */
public interface SkuInfoMapper extends BaseMapper<SkuInfo> {

    SkuInfo checkStock(@Param("skuId") Long skuId,@Param("skuNum") Integer skuNum);

    int lockStock(@Param("skuId") Long skuId,@Param("skuNum") Integer skuNum);

    void unlockStock(@Param("skuId") Long skuId,@Param("skuNum") Integer skuNum);

    void deductStock(@Param("skuId") Long skuId,@Param("skuNum") Integer skuNum);
}
